package jsprintorbitor.experiment.graph;

import laboratoryQ.common.IDisposable;
import laboratoryQ.computation.BaseUtils;

public class AlgGenPair implements IDisposable {
	public final IGraphAlgorithm algorithm;
	public final IGraphGenerator generator;

	public final int sprinterNo;
	public final int generatorNo;

	public AlgGenPair(
			IGraphAlgorithm algorithm, IGraphGenerator generator,
			int sprinterNo, int generatorNo
	) {
		this.algorithm = algorithm;
		this.generator = generator;
		this.sprinterNo = sprinterNo;
		this.generatorNo = generatorNo;
	}

	@Override
	public void dispose() {
		BaseUtils.dispose(algorithm, generator);
	}

	@Override
	public String toString() {
		return algorithm.toString() + " " + sprinterNo + " " + generatorNo;
	}
}
